/* CreateDesign.module.css */
.canvas_size_selector {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  height: 600px;
}

.selector_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.selector_title {
  color: #333;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.close_btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0 8px;
}

.close_btn:hover {
  color: #666;
}

.selector_container {
  display: flex;
  gap: 24px;
  height: calc(100% - 60px);
}

.preset_sizes {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.custom_size {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section_title {
  color: #666;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

/* 预设尺寸行布局 */
.preset_row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex: 1;
}

.preset_item {
  padding: 10px;
  border: 2px solid;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

.preset_item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.preset_item.selected {
  border-width: 3px;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

.preset_thumbnail {
  width: 100%;
  height: 110px;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 8px;
  background-color: #f8f8f8;
}

.preset_thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preset_info {
  flex: 1;
}

.preset_name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: #333;
}

.preset_dimensions {
  font-size: 12px;
  color: #888;
}

/* 右侧自定义尺寸区域样式 */
.form_group {
  margin-bottom: 20px;
}

.form_label {
  display: block;
  margin-bottom: 8px;
  color: #666;
  font-size: 14px;
}

.preset_select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  cursor: pointer;
  font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 16px;
}

.dimension_inputs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.input_group {
  display: flex;
  align-items: center;
  position: relative;
  flex: 1;
}

.dimension_input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-align: right;
  font-size: 14px;
}

.dimension_input:disabled {
  background-color: #f5f5f5;
  color: #999;
}

.unit {
  margin-left: 12px;
  font-size: 13px;
  color: #888;
  min-width: 16px;
}

.dimension_separator {
  font-size: 16px;
  color: #666;
  margin: 0 4px;
}

.lock_btn {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 8px;
  padding: 0;
  color: #666;
}

.lock_icon {
  font-size: 16px;
}

.create_btn {
  width: 100%;
  padding: 12px;
  background-color: #FF9500;
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: auto;
}

.create_btn:hover {
  background-color: #FF7B00;
}

.create_btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .selector_container {
    flex-direction: column;
  }
  
  .preset_row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .preset_row {
    grid-template-columns: 1fr;
  }
  
  .dimension_inputs {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .dimension_separator {
    display: none;
  }
}